clear
clc
close all

% rErr = [1.6,4.5,14,4.5,1.5,13,26]/100;
% 
% names = {'ATLAS I','DELTA II','Peag/Taurus','STS (Shuttle)','Titan II',...
%     'Water Bottle','ARES I-X test'};


rErr = [4.5,13,26]/100;

names = {'STS',...
    'Water Bottle','ARES I-X'};

bWidth = .5;


numErrs = length(rErr);


figure
hold on
for i = 1:numErrs
    bBarX = [i-bWidth/2,i+bWidth/2,i+bWidth/2,i-bWidth/2,i-bWidth/2];
    bBarY = [0,0,1,1,0];
    
    fill(bBarX,bBarY,'b');
    
    eBarX = bBarX;
    
    eBarY = [1-rErr(i)/2,1-rErr(i)/2,1+rErr(i)/2,1+rErr(i)/2,1-rErr(i)/2];
    
    fill(eBarX,eBarY,'r')
    
end

set(gca, 'xtick', [1:numErrs], 'xticklabel', names)